home *** CD-ROM | disk | FTP | other *** search
- #if !defined(USEDUMP)
- #include "lprlib.h"
- #include "lprdef.h"
- #include "lprfuncs.h"
- #else
- #pragma load "lprDumpFile"
- #endif
-
- extern unsigned char sw_bgrnd;
- extern unsigned char mf_bgrnd;
-
- extern DialogPtr statptr;
-
- extern bgproc(); /* assembler routine to get background calls */
-
- void sw_suspend(void)
- {
- WorldTable * wt, * get_world();
-
- if (!sw_active()) {
- mf_bgrnd = 1;
- if (statptr) statGrowIcon();
- return;
- }
- sw_bgrnd = 1; /* indicate backgound mode pending */
- wt = get_world(); /* install background routine */
- wt->WTBgtask = (ProcPtr)&bgproc;
- }
-
- void sw_resume(void)
- {
- WorldTable * wt, * get_world();
-
- if (mf_bgrnd == 1) {
- if (statptr) {
- SelectWindow(statptr);
- statGrowIcon();
- }
- mf_bgrnd = 0;
- }
- if (sw_bgrnd == 0) return;
-
- sw_bgrnd = 0; /* indcate no longer in background */
- wt = get_world(); /* de-install background routine */
- wt->WTBgtask = 0;
- if (statptr) statGrowIcon();
- }
-
- short sw_active(void) /* tell caller if we're under Switcher */
- {
- static long * sw_globals = 0x282;
-
- if ((*sw_globals) == 0) return(0);
- if ((*sw_globals) == -1) return(0);
- return(1);
- }
-
- WorldTable * get_world()
- {
- static unsigned long * ApplZone = 0x2aa;
-
- return((WorldTable *)((*ApplZone) - 18));
- }
-
- void sw_proc(void) /* called as background process */
- {
- tcpevent();
- }
-